package environment;

import java.util.ArrayList;
import java.util.Random;
import wowmobile.Monster;
import wowmobile.Database;

public class Grass extends Environment
{
    private static final boolean walkAble = true;
    private static final int atackChance = 5;
    private static final int image=6;
    private ArrayList<Monster> monsters;

    public Grass(String grass)
    {
        monsters=Database.getMonster(grass);
    }

    public void addMonster(Monster m)
    {
        monsters.add(m);
    }

    public boolean isAtacked()
    {
        Random r=new Random();
        int tmp=r.nextInt(100);
        if(tmp<atackChance)
            return true;
        else
            return false;
    }

    public String toString()
    {
        return ""+image;
    }

    @Override
    public boolean isWalkAble() {
        return walkAble;
    }

    @Override
    public ArrayList<Monster> getMonsters() {
        return monsters;
    }
}
